import { domainService } from '~/config/server'
import { NetService } from '~/utils/net.service'
import { Inject, Debounce } from "~/core/decorator";
import { Service } from '~/core/service'

export class ListRemovedService extends Service {

  @Inject(NetService)
  private netService: NetService

  /**
   * 根据账户号查询账户信息
   */
  public findCaseInfo (data) {
    return this.netService.send({
      server: domainService.listRemovedController.findCaseInfoByCaseNumber,
      data
    })
  }
  /**
   * 根据客户号查询账户信息集合
   */
  public findCustomerNo (data) {
    return this.netService.send({
      server: domainService.listRemovedController.findCaseInfoByCustomerNo,
      data
    })
  }
  /**
   * 查询出一条名单剔除策略，用作查看或编辑
   */
  public findNameById (data) {
    return this.netService.send({
      server: domainService.listRemovedController.findNameListEliminateStrategyById,
      data
    })
  }
  /**
   * 查询名单剔除审批记录
   */
  public findNameHistory (data, page?) {
    return this.netService.send({
      server: domainService.listRemovedController.findNameListEliminateStrategyRecordHistory,
      data,
      page
    })
  }
  /**
   * 查询名单剔除
   */
  public getNameList (data, page) {
    return this.netService.send({
      server: domainService.listRemovedController.getNameListEliminateStrategyList,
      data,
      page
    })
  }
  /**
   * 查询名单剔除策略队列历史注记
   */
  public getNameLogList (data, page) {
    return this.netService.send({
      server: domainService.listRemovedController.getNameListEliminateStrategyLogList,
      data,
      page
    })
  }
  /**
   * 保存名单策略
   */
  public saveNameList (data) {
    return this.netService.send({
      server: domainService.listRemovedController.saveNameListEliminateStrategy,
      data,
      loading: true
    })
  }
  /**
   * 下载剔除模板
   */
  public downTemplate () {
    return this.netService.send({
      server: domainService.listRemovedController.downLoadNameListEliminateTemplate
    })
  }
  /**
   * 上传名单剔除
   */
  public importEliminate (data) {
    return this.netService.send({
      server: domainService.listRemovedController.importNameListEliminate,
      data
    })
  }
}

